<?php
class Edition extends Model {

	protected $_updatePK = false;
	
	public function getMainAuthor()
	{
		return AuthorManager::getInstance()->getMainByEditionIsbn($this->isbn);
	}
	
	public function getAuthors()
	{
		return AuthorManager::getInstance()->getByEditionIsbn($this->isbn);
	}

	public function getAllAuthors()
	{
		return AuthorManager::getInstance()->getAllByEditionIsbn($this->isbn);
	}
	
	public function getPublishing()
	{
		return PublishingManager::getInstance()->getByEditionIsbn($this->isbn);
	}
	
	public function getCopies()
	{
		return CopyManager::getInstance()->getByIsbn($this->isbn);
	}
	
	public function getAvailableCopies()
	{
		return CopyManager::getInstance()->getAvailableByIsbn($this->isbn);
	}
	
	public function getBook()
	{
		return BookManager::getInstance()->getById($this->idKsiazki);
	}
	
}